#ifndef myPoint3D_H
#define myPoint3D_H

	#include <math.h>
	#include <iostream>
	#include "vector3d.h"

	class myPoint3D
	{
	  //The x,y,z coordinates of this point.
	public:

	  double X, Y, Z; 

	  myPoint3D() {}

	  myPoint3D(double x, double y, double z)
	  {
		X = x;
		Y = y;
		Z = z; 
	  }
	
	  myPoint3D operator+(myVector3D & v1)
	  {
		return myPoint3D(v1.dX + X, v1.dY + Y, v1.dZ + Z);
	  }

	  myPoint3D operator-(myVector3D & v1)
	  {
		return myPoint3D(X - v1.dX, Y - v1.dY, Z - v1.dZ);
	  }

	  myVector3D operator-(myPoint3D & v1)
	  {
		return myVector3D(v1.X - X, v1.Y - Y, v1.Z - Z);
	  }

	  double dist(myPoint3D p1)
	  {
		return sqrt(  (p1.X-X)*(p1.X-X) + (p1.Y-Y)*(p1.Y-Y) + (p1.Z-Z)*(p1.Z-Z)  ); 
	  }

	  void print(char *s)
	  {
		  std::cout << s << X << ", " << Y << ", " << Z << "\n";
	  }
	};

#endif





